import { useUserStore } from '@/store'

export default [
  {
    key: 'auth',
    value: {
      mounted(el, { value: keys = [] }) {
        const userStore = useUserStore()
        const userRoles = userStore.userInfo?.role || []

        if (!userRoles.some((v) => keys.includes(v))) {
          el.style.display = 'none'
        }
      },
    },
  },
]
